<#-- tab -->
<#macro Tabs id="" style="" tabPosition="top" wizardCount=0 titles=[] paneids=[]>
    <#if id=="">
        <#assign CurrentTabId="Tabs_${GetUniqueIndex()}"/>
    <#else>
        <#assign CurrentTabId=id/>
    </#if>
    <#if wizardCount gt 0>
        <#assign CurrentWizardName=id/>
        <#assign CurrentWizardIndex=0/>
        <#assign CurrentWizardCount=wizardCount/>
    </#if>
    <#assign SelectedTabPaneId=""/>
    <div id="${CurrentTabId}" style="${style}">
    	<#if titles?size gt 0>
    		<ul>
    			<#list titles as title>
    				<#assign TabPaneId="${paneids[title_index]}"/>
    				<#if TabPaneId==""><#assign TabPaneId="TabPane_${GetUniqueIndex()}"/></#if>
    				<li><a href="#${TabPaneId}">${title}</a></li>
	        	</#list>
	        </ul>
    		<#nested>
    	<#else>
	    	<ul>
	        	<#nested>
	        </ul>
        </#if>
    </div>
   
    <script type="text/javascript">
		$(document).ready(function(){
			$( "#${CurrentTabId}" ).tabs();
		});
	</script>
</#macro>

<#macro TabPane title id="" closable="false" selected="false" href="" style="" autoreload="false">
    <#assign TabPaneId=id/>
    <#if TabPaneId==""><#assign TabPaneId="TabPane_${GetUniqueIndex()}"/></#if>
    <#if selected=="true" && SelectedTabPaneId=="">
        <#assign SelectedTabPaneId=TabPaneId/>
    </#if>
    <#if TabPaneId!="">
		<div id="${TabPaneId}">
			<#nested>
		</div>
    </#if>
    <#if href!="">
    	<li><a href="${href}">${title}</a></li>
    </#if>
</#macro>